<!DOCTYPE html>
<html>
<head>
<title></title>
#parse("sys/header.html")
</head>
<body>
<div id="rrapp" v-cloak>
	<div v-show="showList">
		<div class="grid-btn">
			#if($shiro.hasPermission("testcontent:save"))
			<a class="btn btn-primary" @click="add"><i class="fa fa-plus"></i>&nbsp;新增</a>
			#end
			#if($shiro.hasPermission("testcontent:update"))
			<a class="btn btn-primary" @click="update"><i class="fa fa-pencil-square-o"></i>&nbsp;修改</a>
			#end
			#if($shiro.hasPermission("testcontent:delete"))
			<a class="btn btn-primary" @click="del"><i class="fa fa-trash-o"></i>&nbsp;删除</a>
			#end
		</div>
	    <table id="jqGrid"></table>
	    <div id="jqGridPager"></div>
    </div>
    
    <div v-show="!showList" class="panel panel-default">
		<div class="panel-heading">{{title}}</div>
		<form id="form1" class="form-horizontal" style='width:100%;' httpMethod="post" enctype="multipart/form-data"><!-- 调整宽度 -->
			<div class="form-group">
			   	<div class="col-sm-2 control-label">封面图片</div>
			   	<div class="col-sm-10">
			   		<img v-show="!showImg" id="imgId" style="height:120px;" alt="" src="" >
			       <input id="files" name="files" onchange="fileChange(1,this)" type="file" class="file"  data-show-upload="false">
			    </div>
			</div>
											<div class="form-group">
			   	<div class="col-sm-2 control-label">富文本内容</div>
			   	<div class="col-sm-10">
			     <textarea id="content" style='width:100%;height:250px'></textarea><!-- 调整宽度 -->
			    </div>
			</div>
									
							<div class="form-group">
				<div class="col-sm-2 control-label"></div> 
				<input type="submit" class="btn btn-primary" @click="saveOrUpdate" value="确定"/>
				&nbsp;&nbsp;<input type="button" class="btn btn-warning" @click="reload" value="返回"/>
			</div>
		</form>
	</div>
</div>

<input size="16" type="text" id="datetimeStart" readonly class="form_datetime">
--
<input size="16" type="text" id="datetimeEnd" readonly class="form_datetime">
<script type="text/javascript">
/*其中，”format”表示时间的格式：year month day hour min second; 
“minView”设置为0，表示可以选择小时和分钟，其他值有1,2,3,4.读者可以根据需要使用； 
“minuteStep”是选择分钟时显示的时间间隔，此处设置为1分钟；
format: 'yyyy-mm-dd hh:ii:ss',
*/
    $("#datetimeStart").datetimepicker({
        format: 'yyyy-mm-dd hh:ii',
        minView:0,
        language: 'zh-CN',
        autoclose:true,
        startDate:new Date()
    }).on("click",function(){
        $("#datetimeStart").datetimepicker("setEndDate",$("#datetimeEnd").val())
    });
    $("#datetimeEnd").datetimepicker({
        format: 'yyyy-mm-dd hh:ii',
        minView:0,
        language: 'zh-CN',
        autoclose:true,
        startDate:new Date()
    }).on("click",function(){
        $("#datetimeEnd").datetimepicker("setStartDate",$("#datetimeStart".val()))
    });
</script>
<script src="${rc.contextPath}/js/testcontent/testcontent.js?_${date.systemTime}"></script>
</body>
</html>